#!/bin/bash

if [ $# -lt 2 ] 
then
    echo "Usage: ./fillZeroToLinkCount.sh in_link_count_file original_file";
    exit 1;
else
    link_count_file=$1
    original_file=$2
fi
awk '
FILENAME==ARGV[1]{
    { #second use the dict file to get the select user dict
        inLinkCount[$1] = $2;
    }
}
FILENAME==ARGV[2]{
    if ($1 in inLinkCount) {
        print $1, inLinkCount[$1];
    }
    else {
        print $1,"0";
    }
}' $link_count_file $original_file
